package com.fileDemo;

import java.io.*;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: FENGYiMing
 * @Date: 2024/04/09/10:50
 * @Description:
 */
public class BufferCopy {
    public static void main(String[] args) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new FileReader("e:/a.java"));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("e:/a01.java"));
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            bufferedWriter.write(line);
            bufferedWriter.newLine();
        }
        bufferedWriter.close();
        bufferedReader.close();
    }
}
